package com.sl.proxy.server;

import com.sl.proxy.server.base.proxy.ProxyConfig;
import com.sl.proxy.server.base.proxy.ProxyConfiguration;
import com.sl.proxy.server.job.*;
import com.sl.proxy.server.proxy.core.ProxyTunnelServer;
import com.sl.proxy.server.proxy.enhance.HttpProxy;
import com.sl.proxy.server.proxy.enhance.HttpsProxy;
import com.sl.proxy.server.proxy.handler.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 同步时间至2024/8/10 09:51
 *
 * @author: aoshiguchen
 * @date: 2022/6/16
 */
@Configuration
@Import({
        ProxyConfiguration.class,
        HttpsProxy.class,
        DataCleanJob.class,
        FlowReportForDayJob.class,
        FlowReportForHourJob.class,
        FlowReportForMinuteJob.class,
        FlowReportForMonthJob.class,
        ProxyTunnelServer.class,
        HttpProxy.class,
        ProxyMessageAuthHandler.class,
        ProxyMessageConnectHandler.class,
        ProxyMessageDisconnectHandler.class,
        ProxyMessageHeartbeatHandler.class,
        ProxyMessageTransferHandler.class,
        UdpProxyMessageConnectHandler.class,
        UdpProxyMessageTransferHandler.class})
@EnableConfigurationProperties({ProxyConfig.class})
@ComponentScan(basePackages = "com.sl.proxy.server")
@ConditionalOnProperty(value = "square.lake.proxy.server.enabled", havingValue = "true", matchIfMissing = false)
public class ProxyServerAutoConfig {

}
